package com.yjzx.util.service.enums.file;

/**
 * @author yjzx
 * @date 2024/8/14
 * @description 压缩文件类型
 */
public enum CompressionFileType implements FileType{
    /**
     * 压缩文件类型
     */
    ZIP(".zip", "application/zip"),
    TAR(".tar", "application/x-tar"),
    GZIP(".gz", "application/gzip"),
    BZIP2(".bz2", "application/x-bzip2"),
    XZ(".xz", "application/x-xz"),
    RAR(".rar", "application/x-rar-compressed"),
    SEVEN_Z(".7z", "application/x-7z-compressed"),
    ARJ(".arj", "application/x-arj"),
    CAB(".cab", "application/vnd.ms-cab-compressed"),
    ISO(".iso", "application/x-iso9660-image"),
    DEB(".deb", "application/x-debian-package"),
    RPM(".rpm", "application/x-redhat-package-manager"),
    TGZ(".tar.gz", "application/gzip"),
    TBZ2(".tar.bz2", "application/x-bzip2"),
    TXZ(".tar.xz", "application/x-xz"),
    ZSTD(".zst", "application/x-zstd"),
    ZPAQ(".zpaq", "application/x-zpaq"),
    LZMA(".lzma", "application/x-lzma"),
    LZH(".lzh", "application/x-lzh"),
    LZ4(".lz4", "application/x-lz4"),
    LZO(".lzo", "application/x-lzo"),
    PACK200(".pack200", "application/x-pack200"),
    WIM(".wim", "application/x-wim"),
    CPIO(".cpio", "application/x-cpio"),
    SQSH(".sqsh", "application/x-squashfs"),
    ARC(".arc", "application/octet-stream"),
    UDF(".udf", "application/x-udf"),
    MBR(".mbr", "application/octet-stream"),
    VHD(".vhd", "application/octet-stream"),
    VHDX(".vhdx", "application/octet-stream"),
    VMDK(".vmdk", "application/octet-stream"),
    VDI(".vdi", "application/octet-stream"),
    RAW(".raw", "application/octet-stream"),
    QED(".qed", "application/octet-stream"),
    QCOW(".qcow", "application/octet-stream"),
    QCOW2(".qcow2", "application/octet-stream"),
    ;

    CompressionFileType(String extension, String mimeType) {
        this.extension = extension;
        this.mimeType = mimeType;
    }

    private final String extension;

    private final String mimeType;

    @Override
    public String getExtension() {
        return extension;
    }

    @Override
    public String getMimeType() {
        return mimeType;
    }
}
